import React, { Component } from 'react';
import { Route, Switch, Redirect,withRouter } from 'react-router-dom';
import 'antd/dist/antd.css';

// 登录注册
import Login from './pages/login/Login';
import Register from './pages/register/Register';
import ChangePassword from './pages/login/ChangePassword';
import Consultation from './pages/scheduling/Consultation';
import CommonComponent from './pages/commoncomponent/CommonComponent';
import LimitsControl from './pages/limitscontrol/limitscontrol'

//自定义组件SiderDemo
class LoginRegister extends Component {
    constructor(props) {
        super(props);
    }

    componentDidMount() {
    }

    render() {
        return (
            <div>
                <Switch>
                    <Route exact key="Login" path="/Login" component={Login}></Route>
                    <Route exact key="ChangePassword" path="/ChangePassword" component={ChangePassword}></Route>
                    <Route exact key="Register" path="/Register" component={Register}></Route>
                    <Route exact key="Consultation" path="/Consultation" component={Consultation}></Route>
                    <Route exact key="CommonComponent" path="/99010001" component={CommonComponent}></Route>
                    <Route exact key="LimitsControl" path="/limitcontrol" component={LimitsControl}></Route>
                    <Route path='/' exact render={() => (
                        <Redirect to={"/login"} />
                    )}/>
                </Switch>
            </div>
        )


    }
}

//输出组件
export default withRouter(LoginRegister);

